home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Games World / SharewareGames / Xconq 7.2.2 / lib / fantasy.g < prev    next >
Text File  |  1998-05-22  |  38KB  |  1,024 lines

  1. (game-module "fantasy"
  2.   (title "Swords and Sorcery")
  3.   (blurb "Fantasy warfare period...")
  4.   (variants
  5.    (see-all false)
  6.    (world-seen false)
  7.    (world-size)
  8.    )
  9. )
  10.  
  11. ; movers & fighters
  12. (unit-type W (name "wizard") (char "W")
  13.   (help "Magician, wielder awesome magic"))
  14. (unit-type i (name "light infantry") (char "i")
  15.   (help "Foot soldiers and mercenaries."))
  16. (unit-type b (name "barbarian") (char "b")
  17.   (help "Rugged, ferocious, lightly armoured warriors."))
  18. (unit-type k (name "heavy infantry") (char "k")
  19.   (help "Foot soldiers in heavy armour"))
  20. (unit-type P (name "paladin") (char "P")
  21.   (help "Holy warrior, extremely tough and well equipped"))
  22. (unit-type R (name "longbowmen") (char "R")
  23.   (help "Archers, scouts, rangers"))
  24. (unit-type H (name "priest") (char "H")
  25.   (help "The Spiritual guides of the land"))
  26. (unit-type s (name "serfs") (char "s")
  27.   (help "Mobs of Peasant serfs and levies"))
  28. (unit-type D (name "dragon") (char "D")
  29.   (help "Dragon, lays waste to the lands"))
  30. (unit-type u (name "undead") (char "u")
  31.   (help "Undead warriors, raised by priests or wizards"))
  32. (unit-type h (name "Horse Cavalry") (char "h")
  33.   (help "Knights that ride horses."))
  34.  
  35. ; magical effects
  36. (unit-type A (name "Armageddon spell") (char "A")
  37.   (help "spell of awesome destruction"))
  38. (unit-type L (name "Lightning spell") (char "L")
  39.   (help "spell good for killing tough things"))
  40. (unit-type F (name "Fireball spell") (char "F")
  41.   (help "spell great for causing lots of damage to soft targets"))
  42. (unit-type M (name "Mass Charm") (char "M")
  43.   (help "spell that charms units over to the caster's side!"))
  44. (unit-type E (name "Wizard Eye") (char "E")
  45.   (help "spell for spying on things"))
  46.  
  47. ; transport
  48. (unit-type G (name "wagon") (char "G")
  49.   (help "Wagons, logistical unit"))
  50. (unit-type C (name "flying carpet") (char "C")
  51.   (help "Magical flying carpet"))
  52. (unit-type cloudkeep (image-name "city30") (char "K")
  53.   (help "wizard's floating keep"))
  54. (unit-type S (name "sailing ship") (char "S")
  55.   (help "ship, for traveling the seas"))
  56. (unit-type g (name "galley") (char "g")
  57.   (help "fast, light, not so seaworthy warship"))
  58.  
  59. ; forts, bases and other special places
  60. (unit-type w (name "wall") (char "w")
  61.   (help "fortified walls"))
  62. (unit-type c (name "castle") (char "c")
  63.   (help "walled castle"))
  64. (unit-type tower (char "T")
  65.   (help "fortified mage's tower"))
  66. (unit-type / (name "camp") (char "/")
  67.   (help "campsite, practically a mobile village"))
  68. (unit-type temple (image-name "parthenon")
  69.   (help "holy place of spiritual power"))
  70.  
  71. ; cities
  72. (unit-type V (name "village") (char "V")
  73.   (help "small town"))
  74. (unit-type * (name "town") (char "*")
  75.   (help "smaller than a city"))
  76. (unit-type @ (name "city") (char "@")
  77.   (help "Large city, seat of a city-state"))
  78.  
  79. ; magical items
  80. (unit-type r (name "ring of regeneration") (char "r")
  81.   (help "magical ring that makes its wearer heal faster"))
  82. (unit-type B (name "crystal ball") (char "B")
  83.   (help "magical device that scans the local area"))
  84. (unit-type p (name "ring of protection") (char "p")
  85.   (help "protective magical device"))
  86. (unit-type f (name "everfull plate") (char "f")
  87.   (help "magical wondor that creates food!"))
  88. (unit-type a (name "amulet of power") (char "a")
  89.   (help "generates mana for its wearer"))
  90.  
  91. (material-type food
  92.   (help "foodstuffs: an army marches on its stomach!"))
  93. (material-type mana 
  94.   (help "magical power"))    ; used to produce magical effects
  95. (material-type metal
  96.   (help "steel, metal, manufacturing capacity for armour and weapons"))
  97.  
  98. (terrain-type sea (char "."))
  99. (terrain-type swamp (char "="))
  100. (terrain-type desert (char "~"))
  101. (terrain-type plains (char "+"))
  102. (terrain-type forest (char "%"))
  103. (terrain-type hills (char "("))
  104. (terrain-type mountains (char "^"))
  105. (terrain-type ice (char "_"))
  106. (terrain-type void (image-name "black") (char ":"))
  107.  
  108. (define t temple)
  109. (define T tower)
  110. (define K cloudkeep)
  111.  
  112. (add W image-name "wizard")
  113. (add i image-name "hoplite")
  114. (add b image-name "viking")
  115. (add k image-name "knight")
  116. (add P image-name "paladin")
  117. (add R image-name "archer")
  118. (add H image-name "holy-man")
  119. (add s image-name "serf")
  120. (add D image-name "dragon")
  121. (add u image-name "undead")
  122.  
  123. (add A image-name "mininuke")
  124. (add L image-name "lightning")
  125. (add F image-name "fireball")
  126. (add M image-name "charm-spell")
  127. (add E image-name "eye")
  128.  
  129. (add G image-name "wagon-2")
  130. (add C image-name "flying-carpet")
  131. (add h image-name "cavalry")
  132. (add S image-name "frigate")
  133. (add g image-name "trireme")
  134.  
  135. (add w image-name "walltown")
  136. (add c image-name "castle")
  137. (add / image-name "camp")
  138. (add V image-name "village")
  139. (add * image-name "town20")
  140. (add @ image-name "city20")
  141.  
  142. (add r image-name "ring-2")
  143. (add p image-name "ring-2")
  144. (add B image-name "crystal-ball")
  145. (add f image-name "plate")
  146. (add a image-name "amulet")
  147.  
  148. (define bases ( w c tower temple cloudkeep / V * @ ))
  149. (define cities ( V * @ ))
  150. (define spells ( A L F M E ))
  151. (define forts ( w c tower cloudkeep ))
  152. (define flyers ( D C cloudkeep ))
  153. (define ships ( S g ))
  154. (define ltfoot ( H R b i s w ))
  155. (define hvyfoot ( k P W ))
  156. (define hoof ( h G ))
  157. (define magickers ( W D ))
  158. (define movers ( W i b k P R H s D u G C cloudkeep h S g ))
  159. (define foot ( W i b k P R H s u ))
  160. (define transport ( G C cloudkeep S g ))
  161. (define magicitems ( r B p f a ))
  162.  
  163. (define water ( sea ))
  164. (define land ( swamp plains forest desert hills mountains ))
  165.  
  166. (add water liquid true)
  167.  
  168. ;;; Static relationships.
  169.  
  170. ;; Unit-unit.
  171.  
  172. (table unit-size-as-occupant add (spells u* 1))
  173.  
  174. (table occupant-max add (W spells 6))
  175. (table occupant-max add (u* magicitems 6))
  176. (table occupant-max add (W u 1))    ; wizards can hold the undead they make.
  177.  
  178. (add W capacity 10)
  179.  
  180. (table occupant-max add (D spells 1))
  181. (table occupant-max add (D ( L F ) 3))
  182. (table occupant-max add (D ( W k P ) 1))    ; dragonriders?
  183. (add D capacity 3)    ; yes, riders take up one of a dragon's spell slots
  184. ; odd, but necessary
  185.  
  186. (table occupant-max add (G ( W i b k P R H s u ) 2))
  187. (add G capacity 2)
  188.  
  189. (table occupant-max add (H u 1))    ; so they can be made!
  190. (add H capacity 1)
  191.  
  192. (table occupant-max add (S ( W i b k P R H s G h u ) 5))
  193. (add S capacity 5)
  194.  
  195. (table occupant-max add (C ( W i k P R H s ) 1))
  196. (add C capacity 1)
  197.  
  198. (table occupant-max add (g ( W i b k P R H s u ) ( 1 1 4 1 1 2 1 1 3 )))
  199. (add g capacity 4)
  200.  
  201. ; bases capacity
  202. (table occupant-max add (w ( W i b k P R H s G h u C ) 2))
  203. (add w capacity 2)
  204.  
  205. (table occupant-max add (K ( W k P R s D u C ) 4))
  206. (add cloudkeep capacity 8)
  207.  
  208. (table occupant-max add (c ( W i b k P R H s G h S g u ) 3))
  209. (add c capacity 4)
  210.  
  211. (table occupant-max add (T ( W i b k P R H s G h u C ) 2))
  212. (add tower capacity 4)
  213.  
  214. (table occupant-max add (/ ( W i b k P R H s G h S g C ) 6))
  215. (add / capacity 12)
  216.  
  217. (table occupant-max add (V ( W i b k P R H s G h S g C ) 8))
  218. (add V capacity 16)
  219.  
  220. (table occupant-max add (t ( W i b k P R H s G h S g C ) 6))
  221. (add temple capacity 10)
  222.  
  223. (table occupant-max add (* ( W i b k P R H s G h S g C ) 8))
  224. (add * capacity 20)
  225.  
  226. (table occupant-max add (@ ( W i b k P R H s G h S g C ) 15))
  227. (table occupant-max add (@ D 1))
  228. (add @ capacity 30)
  229.  
  230. (table occupant-max add (( T cloudkeep ) spells 2))
  231. ; 1 A ( T cloudkeep ) capacity ; armageddon spell is 'bigger'?
  232.  
  233. (table unit-size-as-occupant add (movers u* 1))
  234. (table unit-size-as-occupant add (( D G h S G ) u* ( 3 2 2 4 3 )))    ;  the exceptions
  235. (table unit-size-as-occupant add (spells u* 1))
  236.  
  237. ; 90 foot h alter-mobility ; h slowed by holding things?
  238.  
  239. (table unit-size-as-occupant add (magicitems u* 0))
  240. (table occupant-max add (u* magicitems 5))    ; rule of 5 magic items, but everything can hold them
  241. (table occupant-max add (spells magicitems 0))    ; except spells
  242. (table occupant-max add (magicitems u* 0))    ; and other magic items!
  243.  
  244. ;; Unit-terrain.
  245.  
  246. ;; Unit-material.
  247.  
  248. (table unit-storage-x 
  249.   (W m* ( 10 100 6 ))
  250.   (i m* ( 16  0 10 ))
  251.   (b m* ( 16  0  6 ))
  252.   (k m* ( 16  0 12 ))
  253.   (P m* ( 12  4  6 ))
  254.   (R m* ( 16  0  6 ))
  255.   (H m* ( 10  8  6 ))
  256.   (s m* ( 10  0  6 ))
  257.   (D m* ( 200 30 6 ))    ; dragons can eat alot!
  258.   (u m* (  0  0  4 ))
  259.   (spells food 0)
  260.   (spells metal 0)
  261.   (spells mana 3)
  262.   (L mana 2)
  263.   (E mana 8)    ; it has extra duration
  264.   (C m* (  0  10 2 ))
  265.   (G m* ( 150 0  6 ))
  266.   (K m* ( 50 200 10 ))
  267.   (h m* ( 50  0 20 ))
  268.   (S m* ( 100 0 30 ))
  269.   (g m* (  50 0 15 ))
  270.   (w m* (  20 0  6 ))
  271.   (c m* ( 200 0 30 ))
  272.   (T m* ( 100 60 20 ))
  273.   (/ m* ( 100 0 25 ))
  274.   (t m* ( 100 8 20 ))
  275.   (V m* ( 150 0 15 ))
  276.   (* m* ( 300 0 30 ))
  277.   (@ m* ( 600 0 60 ))
  278.   (r m* 10)
  279.   (f food 10)
  280.   (a mana 100)    ; holds lots of power, might have it all when found!
  281.   )
  282.  
  283. ;;; Vision.
  284.  
  285. (add ( V * @ ) see-always 1)
  286. (add D see-always 1)    ; Dragons are hard to miss...
  287.  
  288. ;(add u* vision-at 1)
  289. ;(add spells vision-at 0)
  290. ;(add E vision-at 4)    ; the spy-eye!
  291. ;(add flyers vision-at 3)
  292. ;(add bases vision-at 2)
  293. ;(add cloudkeep vision-at 5)
  294. ;(add T vision-at 4)    ; Towers are good for spotting things
  295. ;(add w vision-at 2)    ; can see a little ways from walls.
  296. ;(add @ vision-at 3)    ; cities have tall structures, and people wandering.
  297. ;(add * vision-at 2)
  298. ;(add c vision-at 3)
  299. ;(add R vision-at 2)    ; Archers are good at knowing the surrounding land.
  300. ;(add ( g S ) vision-at ( 2 3 ))    ; ships can see far over flat water
  301.  
  302. ; visibility of stuff
  303. ; non 0/1 visibility must be harsh on CPU! keep # of units with this down
  304. ;FIX visibility is U T -> N, U's % visibility in T
  305. (table visibility add (K t* 20))    ; hard to spot in them clouds!
  306. (table visibility add (C t* 5))    ; hard to spot in the clouds
  307. (table visibility add (R t* 50))    ; Archers are good at hiding on the land.
  308. (table visibility add (E t* 0))    ; invisible spy-eye
  309. (table visibility add (magicitems t* 20))    ;  magic items are sometimes hard to spot.
  310.  
  311. ; small forces hidden by rough terrain
  312. ;FIX conceal is now visibility, you should subtr these numbers from that table
  313. ;FIX ( 80 75 60 40 ) ( forest swamp mountains hills ) R conceal
  314.  
  315. ;;; Actions.
  316.  
  317. ;                         ( W i b k P R H s  D u G C  K h S g ) "movers"
  318. (add movers acp-per-turn (  1 2 3 2 2 3 2 1 10 1 5 12 4 6 5 7 ))
  319.  
  320. ;                         ( A L F M E ) "spells"
  321. (add spells acp-per-turn (  2 9 5 3 6 ))
  322.  
  323. (add cities acp-per-turn 1)
  324.  
  325. ;;; Movement.
  326.  
  327. (add bases speed 0)
  328. (add cities speed 0)
  329.  
  330. (table mp-to-enter-terrain
  331.   (u* t* 99)
  332.   (bases land 1)    ; so you can build bases anywhere?
  333.   (ships sea 1)    ; seas  -- ships Ok, air OK, most others, no go.
  334.   (flyers t* 1)    ; flyers can go almost anywhere.
  335.   (spells t* 1)    ; same for spells
  336.   (ships water 1)    ; sea is pretty straightforward...
  337.   ; movement on terrain...
  338.   ;( W i b k P R H s  D u A L F G C K h S g ) "movers"
  339.   ; ground units and land terrain:
  340.   ; ( swamp plains forest desert hills mountains ) "land"
  341.   ; ground units ant how they handle terrain:
  342.   (W land (2 1 1 1 1 2))
  343.   (i land (2 1 1 1 1 2))
  344.   (b land (2 1 2 1 1 2))
  345.   (k land (2 1 2 2 2 2))
  346.   (P land (1 1 1 1 2 2))
  347.   (R land (1 1 1 1 1 2))
  348.   (H land (2 1 2 2 2 2))
  349.   (s land (2 1 2 1 2 2))
  350.   (u land (1 1 1 1 1 2))
  351.   (G land (99 1 2 2 3 4))
  352.   (h land (3 1 2 2 3 4))
  353.   (( W b G P R u ) ice 1)    ; units that can handle ice!
  354.   (u* void 99)    ; nothing can go into the void!
  355.   )
  356.  
  357. (table mp-to-enter-terrain add (magicitems sea 99))
  358. (table mp-to-enter-terrain add (magicitems land 1))
  359.  
  360. (table consumption-per-move
  361.   ;; All units take 1 fuel to move.
  362.   (movers food 1)
  363.   ;; This is actually lost food production.
  364.   (s food 4)
  365.   ;; Magical things don't require food to move....
  366.   (u food 0) 
  367.   (K food 0)
  368.   (K mana 1)    ; floating castle requires mana to move
  369.   (spells food 0)
  370.   (C food 0)
  371.   (S food 0)    ; they sail!
  372.   )
  373.  
  374. (table ferry-on-entry (u* u* over-all))    ; lets everything attack everywhere: no terrain immunity
  375.  
  376. ;;; Construction.
  377.  
  378. ; production by units.
  379. ; Unit production time should be starting at a base value, and modified
  380. ; by how good the producer is at that particular unit...
  381. ; Base times:
  382. ;  W  i  b  k  P  R  H  s  D  u  A  L  F  M  G  h  C  K  S  g
  383. ; 25  5  8 10 15  9 15  5 30  2  2  2  2  2
  384. ; note: short times for spells compensated by large mana costs
  385. ;  w  c  T  /  t  V  *  @
  386. ;  5 20 15  5 12 30 35 40
  387. ;
  388. ;
  389. ; magickers production
  390. ;FIX make is replaced by acp-to-create, cp-per-build and friends
  391. ;FIX 2 spells W make
  392. ;FIX ( 25 2 10 30 10 ) ( D u C K T ) W make    ; wiz's make magic stuff
  393. ;FIX 2 ( F L ) D make
  394.  
  395. ; first, production by city-type units
  396. ;FIX ( 2 2 30 20 ) ( A L D W ) K make
  397.  
  398. ;FIX 15 temple P make    ; paladins can make shrines, eventually
  399.  
  400. ;FIX 7 / R make    ; Archers can camp...
  401.  
  402. ;FIX ( 11 5 ) ( temple u ) H make    ; 'holy' men can make undead?
  403. ;FIX ( 6 25 15 6 10 30 35 40 ) ( w c T / t V * @ ) s make    ;serfs make lots of stuff
  404.  
  405. ;FIX ( 10 17 5 15 ) ( k P i h ) c make    ; Castles
  406.  
  407. ;FIX ( 12 20 ) ( H P ) temple make
  408. ;FIX (  8 25 6 ) ( w c / ) i make
  409.  
  410.  
  411. ;      i b  R  H s G  h  S  g  W  k  P ) make vector
  412. ;FIX ( 6 8 10 18 6 7 18 19 16          ) ( i b R H s G h S g       ) V make
  413. ;FIX ( 5 5 11 15 5 7 16 14 13 32  9    ) ( i b R H s G h S g W k   ) * make
  414. ;FIX ( 4 4 11 13 5 6 14 13 11 25  7 20 ) ( i b R H s G h S g W k P ) @ make
  415.  
  416. (add ( i b  R  H s G  h  S  g  W  k  P )
  417.   cp ( 6 8 10 18 6 7 18 19 16 30  9 20))
  418.  
  419. (table acp-to-create
  420.   (T W 1)
  421.   (cities ( i b  R  H s G  h  S  g ) 1)
  422.   (( * @ ) ( W  k  P ) 1)
  423.   )
  424.  
  425. (table cp-on-creation
  426.   (T W 1)
  427.   (cities ( i b  R  H s G  h  S  g  ) 1)
  428.   ;; Towns and cities build faster by having new units more complete.
  429.   (* ( i b  R  H s G  h  S  g  W  k  P )
  430.      ( 2 2  1  4 2 1  3  6  4  1  1  1 ))
  431.   (@ ( i b  R  H s G  h  S  g  W  k  P )
  432.      ( 3 3  1  6 2 2  5  7  8  6  3  1 ))
  433.   )
  434.  
  435. (table acp-to-build
  436.   (T W 1)
  437.   (cities ( i b  R  H s G  h  S  g  W  k  P ) 1)
  438.   )
  439.  
  440. (table cp-per-build
  441.   (T W 1)
  442.   (cities ( i b  R  H s G  h  S  g  W  k  P ) 1)
  443.   )
  444.  
  445. ;; Material needed to make units.
  446.  
  447. ;  mana required for magical stuff
  448. ; typical mage should get 2 to 4 mana per turn, dep on site...
  449. (table consumption-per-build
  450.   ;                A  L   F  M  E  spells
  451.   (spells mana (  50 14  12 20  6 ))
  452.   (( D u cloudkeep C ) mana ( 200 10 400 80 ))
  453.   ; most units don't really take food to make...
  454.   ; but armoured ones take metal...
  455.   (i metal 3)
  456.   (k metal 15)
  457.   (P metal 15)
  458.   (G metal 5)
  459.   (S metal 40)
  460.   (g metal 25)
  461.   (w metal 20)
  462.   (c metal 80)
  463.   (T metal 20)
  464.   (/ metal 3)
  465.   (V metal 45)
  466.   (* metal 60)
  467.   (@ metal 120)
  468.   (magicitems mana ( 30 20 25 10 60 ))
  469.   )
  470.  
  471. ; mages must first figure out how to cast their spells!
  472. ;FIX 200 spells research
  473. ;FIX 300 M research
  474. ;FIX 1000 A research
  475.  
  476. (table supply-on-completion
  477.   ;; We don't start with any resources.
  478.   (u* m* 0)
  479.   (u* food 9999)
  480.   ; (bases food 50)    ; bases are only half full. filled units?
  481.   ; (magickers mana 30)    ; magic casters get 30% of their mana capacity
  482.   )
  483.  
  484. ;;; Repair.
  485.  
  486. ; do this by what a unit may repair
  487. ;FIX hp-per-repair is U1 U2 -> .01HP that U1 restores to U2 per repair action
  488. ; ...and you have to add...
  489. ; acp-to-repair is U1 U2 -> ACP to do one repair action
  490. ;(table acp-to-repair add ( W 1))
  491. ;(table hp-per-repair add ( W ( 33 33 33 25 50 33 33 33 33 50 33 33 33 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 )))
  492. (table acp-to-repair add (i bases 1))
  493. (table hp-per-repair add (i bases 50))
  494. (table acp-to-repair add (b g 1))
  495. (table hp-per-repair add (b g 50))
  496. (table acp-to-repair add (b bases 1))
  497. (table hp-per-repair add (b bases 33))
  498. (table acp-to-repair add (k c 1))
  499. (table hp-per-repair add (k c 50))
  500. (table acp-to-repair add (P bases 1))
  501. (table hp-per-repair add (P bases 50))
  502. (table acp-to-repair add (P P 1))
  503. (table hp-per-repair add (P P 50))    ; paladin's healing powers!
  504. (table acp-to-repair add (R ( R / ) 1))
  505. (table hp-per-repair add (R ( R / ) 50))
  506. (table acp-to-repair add (s s 1))
  507. (table hp-per-repair add (s s 33))
  508. (table acp-to-repair add (H foot 1))
  509. (table hp-per-repair add (H foot 100))
  510. (table acp-to-repair add (s bases 1))
  511. (table hp-per-repair add (s bases 100))
  512. (table acp-to-repair add (s G 1))
  513. (table hp-per-repair add (s G 100))
  514. (table acp-to-repair add (s S 1))
  515. (table hp-per-repair add (s S 50))
  516. (table acp-to-repair add (D D 1))
  517. (table hp-per-repair add (D D 100))
  518. (table acp-to-repair add (h h 1))
  519. (table hp-per-repair add (h h 25))
  520. (table acp-to-repair add (u* u 1))
  521. (table hp-per-repair add (u* u 100))    ; undead can't be repaired...
  522. (table acp-to-repair add (W cloudkeep 1))
  523. (table hp-per-repair add (W cloudkeep 50))    ;  Wizards slowly repair cloud castles
  524. (table acp-to-repair add (G foot 1))
  525. (table hp-per-repair add (G foot 50))
  526.  
  527. (table acp-to-repair add (bases u* 1))
  528. (table hp-per-repair add (bases u* 100))
  529. (table acp-to-repair add (forts u* 1))
  530. (table hp-per-repair add (forts u* 100))
  531. (table acp-to-repair add (cities u* 1))
  532. (table hp-per-repair add (cities u* 100))
  533. (table acp-to-repair add (forts forts 1))
  534. (table hp-per-repair add (forts forts 25))    ; forts have a few people who can fix them
  535. (table acp-to-repair add (cities cities 1))
  536. (table hp-per-repair add (cities cities 25))    ; cities have the people to maintain themselves...
  537. (table acp-to-repair add (c ( i cloudkeep h ) 1))
  538. (table hp-per-repair add (c ( i cloudkeep h ) 100))
  539. (table acp-to-repair add (T ( W ) 1))
  540. (table hp-per-repair add (T ( W ) 100))
  541. (table acp-to-repair add (t foot 1))
  542. (table hp-per-repair add (t foot 100))
  543.  
  544. (table mp-to-enter-unit add (flyers u* 20))    ; aircraft can't sortie again until next turn
  545. (table mp-to-enter-unit add (ships bases 20))
  546. (table mp-to-leave-unit add (ships bases 1))
  547.  
  548. ;;; Combat.
  549.  
  550. ; HP of various units.
  551. (define units ( W i b k P R H s D u h A L F M E G C  cloudkeep S g  w  c  T  /  t  V  *  @ ))
  552. (add units hp-max ( 2 2 2 3 4 2 2 2 8 4 3 1 1 1 2 1 2 1 10 4 3 10 20  8  4  8 15 30 45 ))
  553. ;FIX in addition you can set hp-to-repair and other things to cripple a unit
  554. ;(add units hp-at-min-speed ( 1 1 1 1 1 0 1 0 3 0 2 1 1 1 1 1 1 0  4 2 1  2  3  4  2  2  8 16 25 ))
  555. ; NOTE: crippled is at <= value, not <
  556.  
  557. (add spells hp-max 2)    ; not 1 so that they can survive an attack when attacking.
  558. ;(add spells hp-at-min-speed 0)
  559. ; 1 M hp ; So mass charm survives the attack to capture!
  560.  
  561. ; split the matrix in half to make it fit on an 80 col screen!
  562. (define u1 (  W   i   b   k   P   R   H   s   D   u   G   C   h ))
  563. (define u2 (  A   L   F   cloudkeep   S   g   w   c   T   /   t   V   *   @ ))
  564. ; (chances) u# unit hit
  565. ; chances for unit to hit member of u#
  566.  
  567. ; so, here we define the units by how good they are at hitting others
  568. ; ranges:  30% is typical attack percent.
  569. ; it ranges up and down from there...
  570. ;( W   i   b   k   P   R   H   s   D   u   G   C   h ) u1
  571. (table hit-chance add (W u1 ( 25  35  10  30  10  35  20  40  40  30  40  40  30 )))
  572. (table hit-chance add (i u1 ( 50  30  40  20  15  60  25  45  10  20  40  30  20 )))
  573. (table hit-chance add (b u1 ( 45  45  35  25  25  55  35  45  15  30  50  20  25 )))
  574. (table hit-chance add (k u1 ( 35  40  45  25  20  65  30  50  20  30  30  15  30 )))
  575. (table hit-chance add (P u1 ( 40  40  45  35  30  80  30  30  40  50  30  15  30 )))
  576. (table hit-chance add (R u1 ( 30  45  50  25  20  65  30  40  20  15  30  30  25 )))
  577. (table hit-chance add (H u1 ( 30  20  35  20  20  50  35  30  10  45  30  10  20 )))
  578. (table hit-chance add (s u1 ( 20  10  15   5   3  10  10  30   1  10  30   5  10 )))
  579. (table hit-chance add (D u1 ( 40  50  55  35  20  70  40  80  30  40  60  40  80 )))
  580. (table hit-chance add (u u1 ( 20  30  35  20  10  50  10  50  10  30  40  30  30 )))
  581. (table hit-chance add (A u1 ( 50  99  60  90  70  90  80  99  60  99  99  99  99 )))
  582. (table hit-chance add (L u1 ( 50  80  50  90  60  80  80  99  70  99  99  99  99 )))
  583. (table hit-chance add (F u1 ( 50  90  50  80  60  90  80  99  60  99  99  99  99 )))
  584. (table hit-chance add (G u1 (  0   0   0   0   0   0   0   0   0   0   0   0   0 )))    ; noncombatants
  585. (table hit-chance add (C u1 (  0   0   0   0   0   0   0   0   0   0   0   0   0 )))    ; noncombatants
  586. (table hit-chance add (K u1 ( 10   5   5   5   5   5   5   5  25   5  15  20   5 )))    ; Cloudkeep can drop rocks!
  587. (table hit-chance add (h u1 ( 50  45  50  30  30  70  40  60  25  40  50  15  30 )))    ; Cavalry
  588. (table hit-chance add (S u1 (  0   0   0   0   0   0   0   0   0   0   0   0   0 )))    ; ships can only attack other ships
  589. (table hit-chance add (g u1 (  0   0   0   0   0   0   0   0   0   0   0   0   0 )))
  590. (table hit-chance add (w u1 ( 11  30  35  20  10  40  30  40  20  30   0   0  20 )))
  591. (table hit-chance add (c u1 ( 10  40  40  25  12  40  35  40  25  35   0   0  20 )))
  592. (table hit-chance add (T u1 ( 10  35  35  20  10  40  30  40  20  30   0   0  20 )))
  593. (table hit-chance add (/ u1 (  5  20  17  15  10  25  20  30  10  20   0   0  10 )))
  594. (table hit-chance add (t u1 (  8  25  30  20  18  35  30  40  15  35   0   0  15 )))
  595. (table hit-chance add (V u1 (  9  25  30  20  15  30  30  40  15  20   0   0  25 )))
  596. (table hit-chance add (* u1 ( 10  30  35  25  20  40  35  45  20  25   0   0  30 )))
  597. (table hit-chance add (@ u1 ( 15  35  40  30  25  50  40  50  25  30   0   0  30 )))
  598.  
  599. ;( A   L   F   K   S   g   w   c   T   /   t   V   *   @ ) u2
  600. (table hit-chance add (W u2 (  1   1   1  50  30  40  25  20  25  30  35  40  40  40 )))
  601. (table hit-chance add (i u2 (  1   1   1  10  10  10  10  10  10  25  20  20  20  20 )))
  602. (table hit-chance add (b u2 (  1   1   1  10  10  10   8   5   8  40  30  50  50  50 )))
  603. (table hit-chance add (k u2 (  1   1   1  10  10  10   9   9  10  20  25  30  30  30 )))
  604. (table hit-chance add (P u2 (  1   1   1  11   7   8  15  15  15  20  40  20  20  20 )))
  605. (table hit-chance add (R u2 (  1   1   1   8   5   5   8   8   8  30  30  30  30  30 )))
  606. (table hit-chance add (H u2 (  1   1   1   3   4   4   4   4   4  20  50   5   5   5 )))
  607. (table hit-chance add (s u2 (  1   1   1   1   2   2   1   2   2  20  15  20  20  20 )))
  608. (table hit-chance add (D u2 (  1   1   1  20  60  50  30  25  28  50  40  60  60  60 )))
  609. (table hit-chance add (u u2 (  1   1   1   2  10  10  11  11  10  30  20  30  30  30 )))
  610. ; there is some value in chances >100%, since may be adjusted downwards by other factors,
  611. ; but for now they're not allowed.
  612. ;(table hit-chance add (A u2 (  1   1   1  30 199 199 199 150 150 299  70 130 110 100 )))
  613. (table hit-chance add (A u2 (  1   1   1  30 100 100 100 100 100 100  70 100 100 100 )))
  614. (table hit-chance add (L u2 (  1   1   1  30  40  40  80  80  80  99  70  90  90  80 )))
  615. (table hit-chance add (F u2 (  1   1   1  30  99  99  60  50  69  99  75  90  90  90 )))
  616. (table hit-chance add (G u2 (  1   1   1   0   0   0   0   0   0   0   0   0   0   0 )))    ; noncombatat
  617. (table hit-chance add (C u2 (  1   1   1   0   0   0   0   0   0   0   0   0   0   0 )))    ; noncombatant
  618. (table hit-chance add (K u2 (  1   1   1  40   0   0   0   0   0   0   0   0   0   0 )))
  619. (table hit-chance add (h u2 (  1   1   1  10  10  10   6   6   9  40  35  30  30  30 )))    ;
  620. (table hit-chance add (S u2 (  1   1   1   0  20  10   0   0   0   0   0   0   0   0 )))    ; ships ramming each other!
  621. (table hit-chance add (g u2 (  1   1   1   0  50  30   0   0   0   0   0   0   0   0 )))
  622. (table hit-chance add (w u2 (  1   1   1   0   0   0   0   0   0   0   0   0   0   0 )))    ; matrix here and below  is all non-movers vs non-movers!
  623. (table hit-chance add (c u2 (  1   1   1   0   0   0   0   0   0   0   0   0   0   0 )))
  624. (table hit-chance add (T u2 (  0   1   0   0   0   0   0   0   0   0   0   0   0   0 )))
  625. (table hit-chance add (/ u2 (  0   0   0   0   0   0   0   0   0   0   0   0   0   0 )))
  626. (table hit-chance add (t u2 (  0   0   0   0   0   0   0   0   0   0   0   0   0   0 )))
  627. (table hit-chance add (V u2 (  0   0   0   0   0   0   0   0   0   0   0   0   0   0 )))
  628. (table hit-chance add (* u2 (  0   0   0   0   0   0   0   0   0   0   0   0   0   0 )))
  629. (table hit-chance add (@ u2 (  0   0   0   0   0   0   0   0   0   0   0   0   0   0 )))
  630.  
  631. (table hit-chance add (E u* 0))
  632. (table hit-chance add (M u* 10))    ; can do some damage as it attempts to capture
  633.  
  634. ; and this allows ti to even attack...
  635. (table hit-chance add (movers spells 50))    ;  spells can be killed by attacking them, but
  636. (table hit-chance add (movers M 10))    ;
  637. ; they shouldn't have much time where they can be attacked.
  638. ; they are either in-flight, or stored on someone!
  639.  
  640. ; terrain effects
  641. (table defend-terrain-effect add (foot ( forest swamp mountains hills ) 85))
  642. (table defend-terrain-effect add (hvyfoot ( forest swamp mountains hills ) 90))
  643.  
  644. (table defend-terrain-effect add (R ( forest swamp mountains hills desert ) (25 40 40 60 90)))
  645. ; archers are good at using terrain to hide in.
  646.  
  647. (table defend-terrain-effect add (forts ( hills mountains ) 60))
  648. (table defend-terrain-effect add (T ( hills mountains ) (80 50)))
  649. (table defend-terrain-effect add (c ( hills mountains ) (80 50)))
  650.  
  651. (table damage
  652.   (u* u* 1)    ; default
  653.   (D u* 2)
  654.   (u* magicitems 0)    ;  otherwise, items are always destroyed by capture
  655.   (D bases 3)
  656.   (D cities 4)
  657.   (b bases 3)    ; barbarians torch them cities!
  658.   (R D 4)    ; rangers with those special arrows!
  659.   (g ships 2)
  660.   (( P H ) u 3)
  661.   (h ltfoot 1)
  662.   (F ships 4)
  663.   (F cities 4)
  664.   (F u* 2)
  665.   (F / 4)
  666.   (L u* 3)
  667.   (M u* 1)    ; it might do some damage as the victim struggles
  668.   (A u* 21)    ; Armageddon spells are nuclear!
  669.   (magicitems u* 0)    ; magic items can't hurt anything
  670.   )
  671.  
  672. ;FIX true counterattack
  673.  
  674. (table acp-to-defend add (spells u* false))    ; they're specifically targeted!
  675. (table acp-to-defend add (w u* false))    ; walls don't fight back! They're just walls!
  676. (add spells acp-to-detonate 1)
  677.  
  678. ; these units may be persuaded to go traitor
  679.  
  680. (table capture-chance
  681.   (W ( W i k s D u A L F G K T ) ( 20 20 20 40 20 40 30 30 30 20 50 40 ))
  682.   ;                                 ( s  G h  S  g  w c  T  /  t  V  *  @ )
  683.   (i ( s G h S g w c T / t V * @ ) ( 40 50 5 30 30 10 5  8 30 20 40 25 15 ))
  684.   (b ( s G h S g w c T / t V * @ ) ( 40 50 5 45 40  8 3  7 40 25 20 10  7 ))
  685.   (R ( s G h S g w c T / t V * @ ) ( 10 20 5 10 10  8 3  7 40 25 45 25 10 ))
  686.   (k ( s G h S g w c T / t V * @ ) ( 45 40 5 15 10 12 6  9 35 25 45 25 13 ))
  687.   (P ( s G h S g w c T / t V * @ ) ( 50 30 8 20 20 11 7 10 36 45 40 20 10 ))
  688.   (h ( s G h S g w c T / t V * @ ) ( 50 40 5  5  5  5 1  5 60 30 40 20 10 ))
  689.   (H ( s G h           / t V * @ ) ( 60 10 10              20 35 40 15 15 ))
  690.   (u ( G S   S g w c T / t V * @ ) ( 40 50   25 30 11 6  9 20 10 15 10  5 ))
  691.   (H ( i b u ) ( 20 15 40 ))    ; priests can convert people!
  692.   (s ( s G cloudkeep / V * @ ) ( 20 30 45 30 30 20 15 ))
  693.   ; the Charm Spell...
  694.   (M u* 100)    ; the standard default
  695.   ; the 200% of M vs / is not accepted, though perhaps it should be.
  696.   (M ( w c T / t V * @ ) ( 100 50 100 100 #|200|# 25 60 50 40 ))
  697.   ; works better against low populations
  698.   (M ( W P H D cloudkeep T ) ( 50 10 40 50 25 80 ))
  699.   (u* magicitems 100)    ;  magical items don't have loyalty
  700.   )
  701.  
  702. (table protection
  703.   (bases u* 70)    ; general bases protect their occupants ok
  704.   (forts u* 20)    ; forts prottect their occupants very well
  705.   (/ movers 80)
  706.   (V movers 80)
  707.   (* movers 70)
  708.   (@ movers 60)
  709.   (( i k P W ) forts 50)
  710.   (u forts 60)
  711.   (( i k P W ) bases 70)
  712.   (H temple 50)    ; priests and their temples...
  713.   (W ( cloudkeep tower ) 20)    ; wiz's protect their towers and keeps very well
  714.   )
  715.  
  716. (table protection add (u* p 80))    ; ring of protection, reduces hit-chance by 20%
  717.  
  718. ;(add i possible-sides ((not "independent")))
  719.  
  720. (table withdraw-chance-per-attack
  721.   (u* movers 10)
  722.   (u* R 33)    ; those rangers like to run away!
  723.   (u* ships 0)    ; boats can't retreat!
  724.   )
  725.  
  726. (table consumption-per-attack add (D food -5))    ; dragon feeds on enemies!
  727. (table consumption-per-attack add (W mana 1))    ; mages use spells in combat!
  728. (table consumption-per-attack add (K metal 1))    ; Cloudcastles throw stuff down to attack
  729.  
  730. ;FIX I guess nuked is damaged-terrain now, T1 T2 -> N
  731. ;FIX t* t* nuked    ; most terrain won't actually change when nuked
  732. ;FIX desert ( plains forest ) nuked    ; except forest, plains turn to desert.
  733. ;FIX mountains ice nuked    ; ice gets nuked into mountains.
  734.  
  735. ;;; Texts.
  736.  
  737. (set action-notices '(
  738.   ((destroy u* land) (actor " defeats " actee "!"))
  739.   ((destroy u* ships) (actor " sinks " actee "!"))
  740.   ((destroy u* flyers) (actor " knocks down " actee "!"))
  741.   ((destroy u* cities) (actor " sacks " actee "!"))
  742.   ((destroy u* D) (actor " slays " actee "!"))
  743.   ((destroy u* h) (actor " slays " actee "!"))
  744.   ))
  745.  
  746. (add magicitems hp-max 1)    ;
  747.  
  748. ; combat stats should be irrelevant, since they're always occupants
  749. (table hit-chance add (u* magicitems 100))    ; everything can hit them
  750. (table hit-chance add (magicitems u* 0))    ; they can't hit back!
  751. (table acp-to-defend add (magicitems u* 0))
  752. (table capture-chance add (u* magicitems 100))    ; just pick them up!
  753.  
  754. ;;; Other Actions.
  755.  
  756. ;FIX spy-chance is now on a per unit basis...
  757. ; and spy-range specifies how far a unit can spy
  758. (add u* spy-chance false)    ; we don't spontaneously see all the enemies
  759. ;FIX spy-quality is U1 U2 -> % that U1 returns info about U2
  760. (table spy-quality (u* u* false))    ; and we don't see any of them if we do!
  761.  
  762. (add u* acp-to-disband 1)
  763. (add u* hp-per-disband 100)
  764. (add magicitems hp-per-disband 0)    ; they can't be destroyed!
  765.  
  766. ;;; Scoring.
  767.  
  768. (add bases point-value ( 1 20 8 8 30 2 8 10 50 ))    ;  territory values for victory pts.
  769. (add s point-value 5)    ; serfs are valuable!
  770.  
  771. (scorekeeper (do last-side-wins))
  772.  
  773. (table supply-on-completion add (magicitems m* 100))    ; they're usually statically full
  774. ;FIX ( 10 6 8 6 15 ) magicitems W make    ; wizards make them only
  775. ;FIX ( 12 12 9 4 0 ) magicitems H make    ; priests can make some items
  776. ;FIX 50 magicitems research    ; discover the magic formulae?
  777. ;FIX 25 magicitems magicitems research-contrib
  778.  
  779. (table acp-to-repair add (r u* 1))
  780. (table hp-per-repair add (r u* 100))    ; ring of regeneration magically fixes everything!
  781. ; ring must be able to hold supplies to perform repairs! Sheesh!
  782.  
  783. (table productivity add (magicitems t* 100))
  784.  
  785. (table consumption-as-occupant add (magicitems m* 0))    ; they dont consume anyway!
  786.  
  787. ;(add B vision-at 10)    ; that's what its for!
  788.  
  789. ;;; Backdrop.
  790.  
  791. (table base-production
  792.   (W mana 5)    ; * very terrain dependent
  793.   (D mana 4)    ; *
  794.   (H mana 2)
  795.   (K mana 12)
  796.   (T mana 5)    ; *
  797.   (t mana 2)
  798.   (P mana 1)
  799.   (r m* 1)    ; ring produces everything, just in case...
  800.   (f food 6)    ; FOOD!
  801.   (a mana 6)    ; amulet of power generates mana
  802.   )
  803.  
  804. ; food production
  805. ; i b k P R H  s c T / t V  *  @ K )
  806. (table base-production add (( i b k P R H s c T / t V * @ K ) food ( 2 4 2 3 6 4 10 2 1 3 6 8 12 16 3 )))
  807. (table base-production add (W food 1))
  808.  
  809. ; metal production
  810. (table base-production add (( H s T c V * @ ) metal ( 2 4 1 2 4 8 16 )))
  811.  
  812. (table productivity add (u* t* 100))    ;the default anyway!
  813. (table productivity add (foot sea 0))
  814. (table productivity add (hoof sea 0))
  815. (table productivity add (( H P ) sea 50))
  816.  
  817. ; sea swp des pln for hil mtn ice vac
  818. ;(  .   =   -   +   %   ~   ^   _  : ) t*
  819. (table productivity add (W t* ( 60  60  60  40  60  80 100 120  0 )))    ; 1 per 20%
  820. (table productivity add (D t* ( 75  50  50  50  75  75 100 125  0 )))    ; 1 per 25%
  821. (table productivity add (T t* (  0  60  40  40  60  80 100 120  0 )))    ; 1 per 20%
  822. ; considerable advantage for mana production on 'ice' and other
  823. ; difficult terrain.
  824. ; ice is usually highest mountain.
  825. ; note, building a T on ice is a pain, as a wiz must do it!
  826.  
  827. ; swamp/plains/forest/desert/hills/mountains = land
  828. (table productivity add (i land (  50 100  90 20  25  50 )))    ; one arg must be a scalar...
  829. (table productivity add (b land (  50 100  90 20  25  50 )))
  830. (table productivity add (k land (  00 100  90 20  25  50 )))
  831. (table productivity add (P land (  50 100 100 50 100  75 )))
  832. (table productivity add (R land ( 100 100 100 50 100 100 )))
  833. (table productivity add (H land (  75 100 100 50  75  75 )))
  834. (table productivity add (s land (  50 100  90 70  75  50 )))
  835. (table productivity add (/ land (  50 100  90 70  75  50 )))
  836. (table productivity add (t land (  50 100  90 70  75  50 )))
  837. (table productivity add (V land (  50 100  90 25  75  50 )))
  838. (table productivity add (* land (  50 100  90 25  75  50 )))
  839. (table productivity add (@ land (  50 100  90 25  75  50 )))
  840.  
  841. (table productivity add (ships sea 100))
  842. (table productivity add (K t* 100))
  843.  
  844.  
  845. ; units' comsumption
  846. (table base-consumption add (movers food 1))    ; all consume 1 food per turn, except...
  847. (table base-consumption add (( i k ) food 2))    ; many infantry per unit, knights are pigs
  848. (table base-consumption add (D food 2))    ; dragons are voracious!
  849. (table base-consumption add (undead food 0))    ; just skeletons, not ghouls!
  850. (table base-consumption add (spells food 0))
  851. (table base-consumption add (C food 0))
  852. (table base-consumption add (( h G ) food 2))    ; horses eat a lot
  853. (table base-consumption add (g food 1))    ; crew needs to eat more when active
  854.  
  855. (table base-consumption add (spells mana 1))    ; spells burn mana in-flight
  856. (table base-consumption add (C mana 1))    ; magic carpet burns mana in flight.
  857.  
  858. ; mutual supply rules:
  859. ; consume-as-occupant is cool!  1 means they do consume!
  860. (table consumption-as-occupant add (u* m* 1))
  861. (table consumption-as-occupant add (spells m* 0))    ; spells in storage require no mana support
  862. (table consumption-as-occupant add (ships m* 0))    ; ships not at sea need no food...
  863.  
  864. ; inlength is how far away a unit can receive fuel from
  865. ; out-length is how far away a unit can deliver fuel.  Should be kept
  866. ; small, as it can waste much CPU time
  867. ;
  868. ;set the supply line the defaults...
  869.  
  870. (table out-length add (movers m* 0))    ; most movables can't supply other things.
  871. (table out-length add (bases m* 1))    ; bases somewhat supply neighbors
  872. (table out-length add (cities m* 2))    ; cities trade with surrounding lands
  873. (table out-length add (W mana 0))    ; mages selfishly hoard magic to themselves.
  874. (table out-length add (G food 2))    ; wagons are supply vehicles
  875. (table out-length add (s m* 1))    ; serfs will trade supplies to units near them
  876. (table out-length add (K m* ( 0 3 0 )))    ; flying citadel magically transmits its mana
  877. (table out-length add (magicitems m* 0))
  878. (table out-length add (a mana 2))
  879.  
  880. (table in-length add (movers m* 1))    ; but they can be supplied by nearby things.
  881. (table in-length add (bases m* 1))    ; bases can recieve things from neighbors.
  882. (table in-length add (spells mana -1))    ; you have to charge the spells yourself
  883. (table in-length add (s m* 1))
  884. ; 0 mana bases in-length ; They generate it, not take it!
  885. ; leave it with normal  in-length -- bases can exchange with each other.
  886. (table in-length add (magicitems m* 0))
  887. (table in-length add (a mana -1))    ; it doesn't take mana, just give it!
  888.  
  889. ;FIX survival is now hp-per-starve U M -> HP
  890. (table hp-per-starve add (( R b ) m* 75))    ; archer, barbarian can live off the land.
  891. (table hp-per-starve add (( H P ) m* 50))    ; holy dudes are used to fasting
  892. (table hp-per-starve add (s m* 33))    ; peasants don't need the food that badly... :-)
  893.  
  894. ;;; Random events.
  895.  
  896. ; disasters: units are in HUNDREDTHS of a percent each TURN
  897. (add magickers revolt-chance 5)    ; sure, tell wizards and dragons orders! Good luck!
  898. (add b revolt-chance 5)    ; those crazy barbarians
  899. (add s revolt-chance 50)    ; Serfs dont' enjoy being oppressed
  900.  
  901. ;FIX surrender is U1 U2 -> .01N chance that U1 surrenders to U2
  902. ; and surrender-range is distance at which it can occur
  903. (table surrender-chance
  904.   (forts u* 50)
  905.   (cities u* ( 100 60 30 ))
  906.   (K u* 0)
  907.   )
  908.  
  909. ;FIX 1500 bases siege    ; most things could be sieged easily
  910. ;FIX 350 forts siege    ; rare for a siege to take a fort...
  911. ;FIX ( 1500 3000 3000 ) ( V * @ ) siege    ; medieval cities fell easily
  912. ;FIX 0 cloudkeep siege
  913.  
  914. ;; Attrition. Mostly ships at sea.
  915.  
  916. (table attrition add (ships sea ( 50  200 )))
  917. (table attrition add (foot ( mountains  swamp ) 100))
  918. (table attrition add (hvyfoot ( mountains swamp ) 200))
  919. (table attrition add (hoof ( mountains swamp ) 300))
  920. (table attrition add (magickers t* 50))
  921.  
  922. ;FIX "gets caught in a storm" ships attrition-message
  923. ;FIX "had a dangerous Arcane accident" magickers attrition-message
  924.  
  925. (table accident-hit-chance add (ships sea ( 10 50 )))    ; ships arent too seaworthy...
  926. ;heavy-foot units should have accidents in swamp and/or mountains
  927. (table accident-hit-chance add (foot ( mountains  swamp ) 50))
  928. (table accident-hit-chance add (hoof ( mountains swamp ) 100))
  929. ;and magickers should have 'accidents'
  930. (table accident-hit-chance add (magickers t* 5))
  931.  
  932. ;FIX "lost in a storm" ships accident-message
  933. ;FIX "fell down and couldn't get up!" foot accident-message
  934. ;FIX "broke down and had to be destroyed." hoof accident-message
  935. ;FIX "returns to its lair to hibernate and disappear into legend" D accident-message
  936. ;FIX "disappears into a puff of smoke" W accident-message
  937.  
  938. ;;; Setup.
  939.  
  940. ;                            sea swp des pln for hil mtn ice vac
  941. ;                              .   =   -   +   %   ~   ^   _   :
  942. (add t* alt-percentile-min (   0  29  70  70  70  75  93  99   0 ))
  943. (add t* alt-percentile-max (  69  71  93  93  93  98  99 100   0 ))
  944.  
  945. (add t* wet-percentile-min (   0  50   0  20  80   0   0   0   0 ))
  946. (add t* wet-percentile-max ( 100 100  20  80 100  99 100 100   0 ))
  947.  
  948. ;FIX this is broken into alt-blob-size, etc. etc.
  949. ;FIX 45 alt-roughness    ; 0-100  the higher this is, the more altitude roughness
  950. ;FIX this is broken into wet-blob-size, etc. etc.
  951. ;FIX 80 wet-roughness    ; Similar to alt-roughness
  952.  
  953. (set edge-terrain void)    ; Edge of the world: you'll fall off!
  954.  
  955. (set country-radius-min 4)    ;  the radius of a 'country'
  956. (set country-separation-min 17)    ;  the closest countries may be
  957. (set country-separation-max 90)    ;  the furthest apart countries may be.
  958.  
  959. (add cities start-with ( 1 2 1 ))    ; units player starts with
  960. (add ( c s temple W ) start-with ( 1 4 1 1 ))    ; some more misc units
  961.  
  962. (table independent-density 
  963.   (V land 60)
  964.   (* land 30)
  965.   (@ land 15)
  966.   ; some rare freaks to find
  967.   (K t* 1)
  968.   (s plains 50)
  969.   (W land 2)
  970.   (C land 5)
  971.   (T land 10)
  972.   (t land 20)
  973.   (D (plains mountains) 5)
  974.   ;; Some random ones to be lying around easy to capture.
  975.   (magicitems t* 5)
  976.   (magicitems sea 0)
  977.   )
  978.  
  979. (table favored-terrain 
  980.   (u* sea 0)
  981.   (u* land 30)
  982.  
  983.   (forts land 100)
  984.  
  985.   (K t* 100)    ; the flying citadel(s) could be anywhere!
  986.   (K void 0)    ; but the void, of course
  987.  
  988.   (magickers land 30)
  989.   (magickers hills 60)
  990.   (magickers mountains 100)
  991.  
  992.   (s land ( 20 100 80 10 40 20 ))
  993.  
  994.   (hoof mountains 0)    ; just in case...
  995.  
  996.   (cities land 20)
  997.   (cities plains 100)
  998.  
  999.   (magicitems sea 0)    ; they'd sink!
  1000.   ;; Nothing goes in the void.
  1001.   (u* void 0)
  1002.   )
  1003.  
  1004. (add u* already-seen 100)
  1005. (add cloudkeep already-seen 0)    ; the K's shouldn't be seen
  1006.  
  1007. (add u* initial-seen-radius 5)
  1008.  
  1009. (include "ng-weird")
  1010.  
  1011. (add (W D) namer "short-generic-names")
  1012. (add cities namer "short-generic-names")
  1013.  
  1014. ;;; Documentation.
  1015.  
  1016. (game-module (instructions (
  1017.   )))
  1018.  
  1019. (game-module (notes (
  1020.   )))
  1021.  
  1022. (game-module (design-notes (
  1023.   )))
  1024.